/**
 * @file rank/popularize/luogu1095/main.cpp
 * @brief
 * @see
 * @author Ruiming Guo (guoruiming@stu.scu.edu.cn)
 * @copyright 2022
 * @date 2022/7/9 21:46:47
 **/

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main() {
  int m, s, t, now = 0;
  cin >> m >> s >> t;
  int s1 = 0, s2 = 0;
  for (int i = 1; i <= t; ++i) {
    s1 += 17;
    if (m >= 10) {
      s2 += 60;
      m -= 10;
    } else {
      m += 4;
    }
    s1 = max(s1, s2);
    if (s1 > s) {
      cout << "Yes\n" << i << '\n';
      return 0;
    }
  }
  cout << "No\n" << s1 << endl;
}
